﻿<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="CityFly" xmlns:page="urn:page">
  <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  <xsl:param name="rowcount"/>
  <!--数据库总记录数-->
  <xsl:param name="maxrow"/>
  <!--每页记录数-->
  <xsl:param name="curpage"/>
  <!--当前页码-->
  <xsl:param name="param"/>
  <!--引入 param 参数-->
  <xsl:param name="templatename"/>
  <!--Label.xml 模块名称-->
  <xsl:param name="orderby"/>
  <!--Label.xml orderby 参数-->
  <xsl:param name="where"/>
  <!--Label.xml where 参数-->
  <xsl:param name="runtime"/>
  <!--运行时长-->
  <msxsl:script language="javascript" implements-prefix="user">var n=5;
    function PageList(cP,rC,qStr,mR){
    var pC=(rC%mR==0)?rC/mR:int(rC/mR)+1;
    var pStr="";
    cP=int(cP);
    if (pC>cP+n){var eP=cP+n;}else{var eP=pC;}
    if (cP-n&lt;=0){var sP=1;}else{var sP=cP-n;}
    if(cP>1){pStr=pStr+" &lt;a href=javascript:TM.tList("+(cP-1)+")&gt;&lt;&lt;&lt;\/a&gt; ";}
    if (cP>n+1){pStr=pStr+"&lt;a href=javascript:TM.tList(1)&gt;1&lt;\/a&gt; ...";}
    for (var i=sP;i&lt;=eP;i++)
    {
    if (i==cP)
    {
    pStr=pStr+" &lt;font class='current' &gt;&lt;b&gt;"+i+"&lt;/b&gt;&lt;\/font&gt; ";
    }else{
    pStr=pStr+" &lt;a href=javascript:TM.tList(" + i + ")&gt;"+i+"&lt;\/a&gt; ";
    }
    }
    if (pC>cP+n){pStr=pStr+"... &lt;a href=javascript:TM.tList("+pC+") class='path'&gt;"+pC+"&lt;\/a&gt;";}
    if(cP&lt;pC){pStr=pStr+" &lt;a href=javascript:TM.tList("+(cP+1)+")&gt;&gt;&gt;&lt;\/a&gt; ";}
    return pStr;
    }</msxsl:script>
  <xsl:template match="/">
     <form id="query_user">
    <div class="dataQuery">
        <label>编号:
          <input name="IDStart" type="text" class="w50" id="IDStart" value="{page:xRequest('idstart')}" />
          -
          <input name="IDEnd" type="text" class="w50" id="IDEnd" value="{page:xRequest('idend')}" />
        </label>
        <label>
        <select name="issueStatus"><option>全部状态</option><option>未审</option></select>
        </label>
        <label>
        <select name="issueStatus"><option>最近三天</option><option>最近一周</option></select>
        </label>
        
        <label>
          <input name="keywords" type="text" class="w100" value="{page:xRequest('keywords')}" />
        </label>
        <input class="btnA" onclick="TM.tQuery(Form.serialize('query_user'))" type="button" value="查询" />
      <input class="btnA" onclick="TM.tQuery()" type="button" value="全部"/>
    </div>
    
      <div class="datahead">
        <div class="colLeft center" style="WIDTH: 30px; padding-top:3px;">
          <input 
onclick="TM.CheckBoxSelect('ID',this.checked)" type="checkbox" />
        </div>
        <div class="colLeft center" style="WIDTH: 50px"> 编码 </div>
        <div class="colLeft center" style="WIDTH: 40px"> 状态 </div>
        <div class="colLeft center" style="WIDTH: 40px"> 发布 </div>
        <div class="colLeft" style="WIDTH: 360px"> 模板|新闻标题 </div>
        <div class="colLeft center" style="WIDTH: 120px"> 栏目 </div>
        <div class="colLeft center" style="WIDTH: 50px"> 作者 </div>
        <div class="colLeft center" style="WIDTH: 50px"> 录入 </div>
        <div class="colLeft center" style="WIDTH: 60px"> 推荐 </div>
        <div class="colLeft center" style="WIDTH: 80px"> 更新时间 </div>
        <div class="colLeft center" style="WIDTH: 40px"> 头条 </div>
<!--        <div class="colLeft center" style="WIDTH: 40px"> 图片 </div>-->
        <div class="colRight center" style="WIDTH: 100px;"> 操作 </div>
      </div>
      <xsl:if test="count(rows/row)!=0">
      <div class="datalist" id="data1">
        <xsl:for-each select="rows/row">
          <div class="row" >
            <xsl:attribute name="onclick">javascript:TM.swithClass(this,'row','row selectBg')</xsl:attribute>
            <div class="colLeft center" style="WIDTH:30px; height:21px;">
            <input type="checkbox" name="ID" id="ID">
            <xsl:attribute name="value"><xsl:value-of select="ID"/></xsl:attribute>
            </input>&nbsp;
            </div>
            <div class="colLeft center" style="WIDTH: 50px" title="{ID}"><xsl:value-of select="ID"/></div>
            <div class="colLeft center" style="WIDTH: 40px" title=""> <xsl:choose>
                <xsl:when test="F_Status=1">
                  <font color="#333333">已审</font>
                </xsl:when>
                <xsl:when test="F_Status=9">
                  <font color="#003399">删除</font>
                </xsl:when>
                <xsl:otherwise>
                  <font color="#999999">未审</font>
                </xsl:otherwise>
              </xsl:choose> </div>
            <div class="colLeft center" style="WIDTH:40px; height:20px;" title="未审核记录不能发布">
            <xsl:choose>
                <xsl:when test="F_IssueStatus=20">
                 <font style="color:#33f">已发</font>
                </xsl:when>
                <xsl:when test="F_IssueStatus=1">
                <font style="color:#f00">返工</font>
                </xsl:when>
                <xsl:otherwise>
                初稿
                </xsl:otherwise>
            </xsl:choose>
            
            </div>
            <div class="colLeft" style="WIDTH: 360px;"><a class="L" href="javascript:">
              <xsl:attribute name="onclick">TM.openTab('编辑资讯','siteid=<xsl:value-of select="page:xRequest('siteid')"/>&amp;id=<xsl:value-of select="ID"/>','编辑(<xsl:value-of select="substring(F_Title,1,8)"/>)')</xsl:attribute>
              <xsl:attribute name="title"><xsl:value-of select="F_Title"/></xsl:attribute>
              <xsl:value-of select="F_Title"/>&nbsp;</a></div>
            <div class="colLeft center" style="WIDTH: 120px;">
              <xsl:attribute name="title"><xsl:value-of select="F_Catalog_Name"/></xsl:attribute>
              <xsl:value-of select="F_Catalog_Name"/></div>
            <div class="colLeft center" style="WIDTH: 50px;">
              <xsl:attribute name="title"><xsl:value-of select="F_UserName"/></xsl:attribute>
              <xsl:value-of select="F_Author"/>&nbsp;</div>
            <div class="colLeft center" style="WIDTH: 50px;">
              <xsl:attribute name="title"><xsl:value-of select="F_UserName"/></xsl:attribute>
              <xsl:value-of select="F_UserName"/></div>
            <div class="colLeft center" style="WIDTH: 60px">
              <xsl:choose>
                <xsl:when test="F_Recommend!=0">
                  推荐(<xsl:value-of select="F_Recommend"/>)
                </xsl:when>
                <xsl:otherwise>
                  <font color="#666666">-</font>
                </xsl:otherwise>
              </xsl:choose>
              </div>
            <div class="colLeft center" style="WIDTH: 80px">
              <xsl:attribute name="title"><xsl:value-of select="F_UpdateTime"/></xsl:attribute>
              <xsl:value-of select="substring(F_UpdateTime,6,11)"/></div>
           <div class="colLeft center" style="WIDTH: 40px">
           	<xsl:if test="count(F_InfoTopCount)=0 or F_InfoTopCount=0">
            <a class="noTopnews" title="设头条新闻"><xsl:attribute name="onclick">TM.openTab('头条新闻','siteid=<xsl:value-of select="page:xRequest('siteid')"/>&amp;id=<xsl:value-of select="ID"/>','设头条新闻(<xsl:value-of select="substring(F_Title,1,8)"/>)')</xsl:attribute>设头条新闻</a>
            </xsl:if>
            <xsl:if test="F_InfoTopCount!=0">
            
              <a class="topnews" title="已设头条新闻" ><xsl:attribute name="onclick">TM.openTab('头条新闻','siteid=<xsl:value-of select="page:xRequest('siteid')"/>&amp;id=<xsl:value-of select="ID"/>','设头条新闻(<xsl:value-of select="substring(F_Title,1,8)"/>)')</xsl:attribute>已设头条新闻</a>
      </xsl:if>
              </div>
<!--<div class="colLeft center" style="WIDTH: 40px">
<xsl:if test="count(F_InfoTopCount)=0 or F_InfoTopCount=0">
            <a class="noPicnews" title="设图片新闻"><xsl:attribute name="onclick">TM.openTab('图片新闻','siteid=<xsl:value-of select="page:xRequest('siteid')"/>&amp;id=<xsl:value-of select="ID"/>','设图片新闻(<xsl:value-of select="substring(F_Title,1,8)"/>)')</xsl:attribute>设图片新闻</a>
            </xsl:if>
            <xsl:if test="F_InfoTopCount!=0">
            
              <a class="picnews" title="已设图片新闻" ><xsl:attribute name="onclick">TM.openTab('图片新闻','siteid=<xsl:value-of select="page:xRequest('siteid')"/>&amp;id=<xsl:value-of select="ID"/>','设图片新闻(<xsl:value-of select="substring(F_Title,1,8)"/>)')</xsl:attribute>已设图片新闻</a>
      </xsl:if>
              </div>-->
            <div class="colRight center" style="WIDTH: 100px;"><a href="javascript:">
              <xsl:attribute name="onclick">TM.openTab('编辑资讯','siteid=<xsl:value-of select="page:xRequest('siteid')"/>&amp;id=<xsl:value-of select="ID"/>','编辑(<xsl:value-of select="substring(F_Title,1,8)"/>)')</xsl:attribute>
              编辑</a>&nbsp;<a class="L" href="javascript:">
              <xsl:attribute name="onclick">TM.openTab('查看文章','id=<xsl:value-of select="ID"/>','查看(<xsl:value-of select="substring(F_Title,1,8)"/>)')</xsl:attribute>
             查看</a> &nbsp;<a target="_blank"><xsl:attribute name="href">http://www.800fc.cc/info/<xsl:if test="count(F_TPath)=0 or F_TPath=''">showinfo-<xsl:value-of select="ID"/>.html</xsl:if><xsl:value-of select="F_TPath"/></xsl:attribute>预览</a></div>
          </div>
        </xsl:for-each>
      </div>
      </xsl:if>
      <div class="pagelist" style="clear:none">
        <div class="menu">
        <div class="fl">
          <label>
            <input 
onclick="TM.CheckBoxSelect('ID',this.checked)" type="checkbox" />
            全选</label>
            <input class="btnA" onclick="TM.openTab('编辑资讯','catalogid={page:xRequest('catalogid')}&amp;siteid='+$('siteid').value,'新增文章');" type="button" value="录入"/>
        </div>
            <div class="fr">
              <input class="btnA" type="button" value="审核">
			  <xsl:attribute name="onclick">if(TM.doCheckBoxCmd('审核文章',{checkbox:'ID'}))TM.tList()</xsl:attribute></input>
              <input class="btnA" style="color:#f00" onclick="if(TM.doCheckBoxCmd('返工文章','ID','0'))TM.tList()" type="button" value="返工" />
              <input class="btnA" style="color: #006" onclick="if(TM.doCheckBoxCmd('发布文章','ID','20'))TM.tList()" type="button" value="发布" />
<input class="btnA" onclick="if(TM.doCheckBoxOpen('批量分类设置','ID','',''))TM.tList()" type="button" value="移动" name="Submit52" />
             <input class="btnA" onclick="if(TM.doCheckBoxConfirmCmd('移至回收站','删除这些文章，移至回收站','ID','9'))TM.tList()" type="button" value="删除"  />
             
             <select name="todo" id="todo" class="styleA" onchange="if(TM.doCheckBoxCmd(this.value,'ID',this.options[this.selectedIndex].rel))TM.tList();else return this.selectedIndex=0;">
            <option value="" style="color:#666">更多操作...</option>
            <option value="删除资讯" rel="0">删除</option>
          </select>
          </div>
        </div>
        <div class="pager"> <div class="fl">共有 <font color="#990000"><xsl:value-of select="$rowcount"/></font> 条&nbsp; |  每页显示 <select name="numbypage" onchange="TM.tQuery(Form.serialize('query_user'))"><option><xsl:if test="$maxrow=20"><xsl:attribute name="selected">1</xsl:attribute></xsl:if>20</option><option><xsl:if test="$maxrow=50"><xsl:attribute name="selected">1</xsl:attribute></xsl:if>50</option><option><xsl:if test="$maxrow=75"><xsl:attribute name="selected">1</xsl:attribute></xsl:if>75</option><option><xsl:if test="$maxrow=100"><xsl:attribute name="selected">1</xsl:attribute></xsl:if>100</option></select> 条</div>   <div class="fr">页码:<xsl:value-of select="user:PageList($curpage,$rowcount,'',$maxrow)" disable-output-escaping="yes"/></div></div>
        <div class="clearfix">&nbsp;</div>
      </div></form>
      <script type="text/javascript">
	  //Sortable.create('data1', {tag:'div',only:'row',tree:true,scroll:window,handle:'row selectBg'});
	  </script>
  </xsl:template>
</xsl:stylesheet>
